using System.Collections.Generic;
using System.Collections.ObjectModel;
using DslModeling = global::Microsoft.VisualStudio.Modeling;

namespace Microsoft.Modeling.StoryboardDesigner
{
    /// <summary>
    /// Partial class to register the custom serializers
    /// </summary>
    public partial class ComponentsSerializationBehavior : ComponentsSerializationBehaviorBase
    {
        protected override System.Collections.ObjectModel.ReadOnlyCollection<DslModeling::DomainXmlSerializerDirectoryEntry> CustomSerializerTypes
        {
            get
            {
                List<DslModeling::DomainXmlSerializerDirectoryEntry> serializers =
                    new List<DslModeling::DomainXmlSerializerDirectoryEntry>();

                // Register the multi-line compartment serializer
                serializers.Add(
                    new DslModeling.DomainXmlSerializerDirectoryEntry(
                        MultiLineCompartment.DomainClassId,
                        typeof(MultiLineCompartmentSerializer)));

                ReadOnlyCollection<DslModeling::DomainXmlSerializerDirectoryEntry> collection =
                    new ReadOnlyCollection<DslModeling::DomainXmlSerializerDirectoryEntry>(serializers);

                return collection;
            }
        }
    }
}